FROM python:3.10.4-slim

# 设置工作目录
WORKDIR /app/python

# 复制requirements.txt并安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 复制Python应用文件
COPY main.py .
COPY cover.py .

# 暴露mitmproxy端口
EXPOSE 8866

# 启动mitmdump服务
CMD ["mitmdump", "-s", "main.py", "-p", "8866"]